package com.example.demo.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @作者： chang
 * @时间： 20-7-8
 * @描述： 歌曲实体类
 */
public class Song implements Parcelable {

    private String author; //歌手
    private int number; //播放次数


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(author);
        parcel.writeInt(number);
    }

    public static final Creator<Song> CREATOR = new Creator<Song>() {
        @Override
        public Song createFromParcel(Parcel in) {
            Song song = new Song();
            song.author =in.readString();
            song.number =in.readInt();
            return song;
        }

        @Override
        public Song[] newArray(int size) {
            return new Song[size];
        }
    };



    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }


    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }
}
